home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / shuffle / aboutbox.frm (.txt) next >
Encoding:
Visual Basic Form  |  1995-05-07  |  7.0 KB  |  217 lines

  1. VERSION 2.00
  2. Begin Form AboutBox 
  3.    BackColor       =   &H00FFFFFF&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "About Shuffle CD Player Example"
  6.    ClientHeight    =   2895
  7.    ClientLeft      =   1260
  8.    ClientTop       =   2250
  9.    ClientWidth     =   4335
  10.    ControlBox      =   0   'False
  11.    FontBold        =   -1  'True
  12.    FontItalic      =   0   'False
  13.    FontName        =   "System"
  14.    FontSize        =   9.75
  15.    FontStrikethru  =   0   'False
  16.    FontUnderline   =   0   'False
  17.    Height          =   3300
  18.    Left            =   1200
  19.    LinkMode        =   1  'Source
  20.    LinkTopic       =   "Form1"
  21.    MaxButton       =   0   'False
  22.    MinButton       =   0   'False
  23.    ScaleHeight     =   2895
  24.    ScaleWidth      =   4335
  25.    Top             =   1905
  26.    Width           =   4455
  27.    Begin CommandButton BTN_OK 
  28.       Caption         =   "OK"
  29.       Height          =   375
  30.       Left            =   1680
  31.       TabIndex        =   0
  32.       Top             =   2400
  33.       Width           =   975
  34.    End
  35.    Begin Image Image1 
  36.       Height          =   480
  37.       Left            =   480
  38.       Picture         =   ABOUTBOX.FRX:0000
  39.       Top             =   360
  40.       Width           =   480
  41.    End
  42.    Begin Label Label11 
  43.       Caption         =   " Windows Version:"
  44.       Height          =   225
  45.       Left            =   240
  46.       TabIndex        =   11
  47.       Top             =   1520
  48.       Width           =   1890
  49.    End
  50.    Begin Label Label10 
  51.       BackStyle       =   0  'Transparent
  52.       Height          =   225
  53.       Left            =   2685
  54.       TabIndex        =   10
  55.       Top             =   1515
  56.       Width           =   1200
  57.    End
  58.    Begin Label Label9 
  59.       BackStyle       =   0  'Transparent
  60.       Caption         =   "All Rights Reserved"
  61.       Height          =   255
  62.       Left            =   1320
  63.       TabIndex        =   9
  64.       Top             =   600
  65.       Width           =   2775
  66.    End
  67.    Begin Label Label8 
  68.       BackStyle       =   0  'Transparent
  69.       Caption         =   "Seater Bros."
  70.       Height          =   255
  71.       Left            =   1320
  72.       TabIndex        =   8
  73.       Top             =   840
  74.       Width           =   1935
  75.    End
  76.    Begin Label Label7 
  77.       BackStyle       =   0  'Transparent
  78.       Caption         =   "Copyright 
  79.  1994 Larry Seater"
  80.       Height          =   255
  81.       Left            =   1320
  82.       TabIndex        =   7
  83.       Top             =   360
  84.       Width           =   3255
  85.    End
  86.    Begin Label Label6 
  87.       BackStyle       =   0  'Transparent
  88.       Caption         =   "Shuffle CD Player Example"
  89.       Height          =   255
  90.       Left            =   1320
  91.       TabIndex        =   6
  92.       Top             =   120
  93.       Width           =   2295
  94.    End
  95.    Begin Label Label4 
  96.       BackStyle       =   0  'Transparent
  97.       Height          =   255
  98.       Left            =   2760
  99.       TabIndex        =   5
  100.       Top             =   1770
  101.       Width           =   1455
  102.    End
  103.    Begin Label Label3 
  104.       BackStyle       =   0  'Transparent
  105.       Height          =   255
  106.       Left            =   240
  107.       TabIndex        =   4
  108.       Top             =   2010
  109.       Width           =   1935
  110.    End
  111.    Begin Label Label2 
  112.       BackStyle       =   0  'Transparent
  113.       Height          =   255
  114.       Left            =   240
  115.       TabIndex        =   3
  116.       Top             =   1770
  117.       Width           =   1935
  118.    End
  119.    Begin Line Line2 
  120.       X1              =   120
  121.       X2              =   4200
  122.       Y1              =   2250
  123.       Y2              =   2250
  124.    End
  125.    Begin Line Line1 
  126.       X1              =   120
  127.       X2              =   4200
  128.       Y1              =   1215
  129.       Y2              =   1215
  130.    End
  131.    Begin Label Label5 
  132.       BackColor       =   &H00FFFFFF&
  133.       BackStyle       =   0  'Transparent
  134.       Height          =   255
  135.       Left            =   2700
  136.       TabIndex        =   1
  137.       Top             =   2010
  138.       Width           =   1455
  139.    End
  140.    Begin Label Label1 
  141.       BackColor       =   &H00FFFFFF&
  142.       BackStyle       =   0  'Transparent
  143.       Height          =   255
  144.       Left            =   240
  145.       TabIndex        =   2
  146.       Top             =   1260
  147.       Width           =   2055
  148.    End
  149. '============================================
  150. ' SHUFFLE CD PLAYER EXAMPLE
  151. ' Copyright(c) 1994 Larry Robert Seater
  152. '============================================
  153. ' Disclaimer of Warranty:
  154. ' This software and the accompanying files are 'as is'
  155. ' and without warranties as to performance of the
  156. ' software and the accompanying files or any other
  157. ' warranties whether expressed or implied.
  158. ' No warranty of fitness for a particular purpose
  159. ' is offered.
  160. ' You may not sell this software or it's source code.
  161. ' You may use this code in any way you find useful.
  162. ' Enough said!
  163. ' This is an example of some things I've learned
  164. ' about the MCI.VBX custom control from the Visual
  165. ' Basic Professional Edition.  This is written in
  166. ' VB Pro 3.0 and needs to be run (I think) on the
  167. ' same.  There may be a few bugs, but I knocked it
  168. ' out in a couple of hours.  There are a few other
  169. ' tricks(?) in the code too.
  170. ' Please if you have any comments (good or bad) or
  171. ' any suggestions, or want to trade code write me or
  172. ' E-Mail me at:
  173. ' AOL: LarryS8302
  174. ' Land Mail: Larry Seater
  175. '            2124 NE 36th Av.
  176. '            Portland, OR 97212
  177. ' Thanks!
  178. DefInt A-Z
  179. Declare Function GetFreeSystemResources Lib "User" (ByVal fuSysResource As Integer) As Integer
  180. Declare Function GetFreeSpace Lib "Kernel" (ByVal wFlags) As Long
  181. Declare Function GetWinFlags Lib "Kernel" () As Long
  182. Declare Function GetVersion Lib "kernel" () As Integer
  183. Const WF_STANDARD = &H10
  184. Const WF_ENHANCED = &H20
  185. Const GFSR_SYSTEMRESOURCES = 0
  186. Sub BTN_OK_Click ()
  187.     Unload AboutBox
  188. End Sub
  189. Sub BTN_OK_KeyPress (KeyAscii As Integer)
  190.     ' Entering any key has the same effect as clicking
  191.     ' on the OK button.
  192.     BTN_OK_Click
  193. End Sub
  194. Sub Form_Load ()
  195. Dim WinFlags As Long
  196. Dim Mode As String, Processor As String
  197.     ' Center form on screen.
  198.     Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
  199.     ' Get system info.
  200.     WinFlags = GetWinFlags()
  201.     If WinFlags And WF_ENHANCED Then Mode = "386 Enhanced Mode" Else Mode = "Standard Mode    "
  202.     Label1 = " " + Mode
  203.     Label2 = " Free Memory:"
  204.     Label3 = " System Resources"
  205.     Label4 = Format$(GetFreeSpace(0) \ 1024) + " KB Free"
  206.     X% = GetFreeSystemResources(GFSR_SYSTEMRESOURCES)
  207.           Label5 = Str$(X%) + "%" + " Free"
  208.     ' Get windows version.
  209.     i% = GetVersion()
  210.     ' Lowbyte is derived by masking off high byte.
  211.     lowbyte$ = Str$(i% And &HFF)
  212.     ' Highbyte is derived by masking off low byte and shifting.
  213.     highbyte$ = LTrim$(Str$((i% And &HFF00) / 256))
  214.     ' Assign Windows version to label caption.
  215.     Label10 = lowbyte$ + "." + highbyte$
  216. End Sub
  217.